// DialogMain.cpp : implementation file
//

#include "stdafx.h"
#include "DllApp.h"
#include "DialogMain.h"
#include "GameEnvironment.h"


// CDialogMain dialog

IMPLEMENT_DYNAMIC(CDialogMain, CDialog)

CDialogMain::CDialogMain(CWnd* pParent /*=NULL*/)
	: CDialog(CDialogMain::IDD, pParent)
{
	
}

CDialogMain::~CDialogMain()
{
}

void CDialogMain::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	DDX_Control(pDX, IDC_EDIT4, CountTextBox);
}


BEGIN_MESSAGE_MAP(CDialogMain, CDialog)
	ON_WM_TIMER()
	ON_BN_CLICKED(IDC_BUTTON1, &CDialogMain::OnBnClickedButton1)
END_MESSAGE_MAP()


// CDialogMain message handlers

void CDialogMain::OnTimer(UINT_PTR nIDEvent)
{
	// TODO: Add your message handler code here and/or call default
	switch(nIDEvent)
	{
	case 10:
		TCHAR szCount[100];
		wsprintf(szCount,L"%d",*(DWORD*)(*(DWORD*)(*(DWORD*)(*(DWORD*)0x96d1dc+0x1c)+0x20)+0x464));
		CountTextBox.SetWindowTextW(szCount);
		break;
	}
	CDialog::OnTimer(nIDEvent);
}

VOID  CALLBACK  CDialogMain::TimerProc(HWND   hwnd, UINT   uMsg,UINT_PTR   idEvent, DWORD   dwTime){
	CountTextBox.SetWindowTextW(L"dd");
}
void CDialogMain::OnBnClickedButton1()
{
	// TODO: Add your control notification handler code here
	::SetTimer(this->m_hWnd,10,1000,NULL);
}
